Activates or deactivates a tracking ToolTip
#include <GuiToolTip.au3>
_GUIToolTip_TrackActivate ( $hWnd [, $fActivate = True [, $hTool = 0 [, $iID = 0]]] )
| $hWnd | Handle to the ToolTip control (returned by _GUIToolTip_Create.) |
| $fActivate | [optional] True to activate, False to deactivate |
| $hTool | [optional] Handle to the window that contains the tool |
| $iID | [optional] Control handle that the tool is assigned to, or application-defined identifier of the tool |
#include <GUIConstantsEx.au3>
#include <GUIToolTip.au3>
Example()
Func Example()
Local $hGUI = GUICreate(StringTrimRight(@ScriptName, 4), 350, 200)
Local $iButton = GUICtrlCreateButton("Button ToolTip", 30, 32, 130, 28)
Local $hButton = GUICtrlGetHandle($iButton)
Local $hToolTip = _GUIToolTip_Create($hGUI,$TTS_BALLOON)
_GUIToolTip_AddTool($hToolTip, 0, " ", $hButton)
_GUIToolTip_SetTitle($hToolTip, 'Mouse position', $TTI_INFO)
GUISetState()
_GUIToolTip_TrackActivate($hToolTip, True, 0, $hButton)
While 1
Sleep(10)
Local $aPos = MouseGetPos()
_GUIToolTip_TrackPosition($hToolTip, $aPos[0] + 10, $aPos[1] + 20)
_GUIToolTip_UpdateTipText($hToolTip, 0, $hButton, "X: " & $aPos[0] & " Y: " & $aPos[1])
if guigetmsg() = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
; Destroy the tooltip control
_GUIToolTip_Destroy($hToolTip)
GUIDelete($hGUI)
EndFunc ;==>Example